package com.xiao.spring_Proxydemo1;


import org.junit.Test;
import spring_Proxydemo1.ProxyOne.CalculatorImplOne;
import spring_Proxydemo1.ProxyOne.CalculatorOne;
import spring_Proxydemo1.ProxyOne.ProxyFactoryOne;

public class ProxyOne {
    @Test
    public void method(){
        ProxyFactoryOne proxyFactoryOne = new ProxyFactoryOne(new CalculatorImplOne());
        CalculatorOne proxy = (CalculatorOne) proxyFactoryOne.getProxy();
        int add = proxy.add(1, 2);
        System.out.println(add);
    }


}
